import axios from "../../axios";

// 回复评论
export const commentReply = (param, formdata) => {
  return axios.request({
    url: "/shops/comment/reply",
    method: "POST",
    params: param,
    data: formdata,
    maxContentLength: Infinity,
    maxRedirects: 5,
    maxBodyLength: Infinity,
  });
};

// 评论帖子
export const commentForum = (param, formdata) => {
  return axios.request({
    url: "/shops/comment/forum",
    method: "POST",
    params: param,
    data: formdata,
    maxContentLength: Infinity,
    maxRedirects: 5,
    maxBodyLength: Infinity,
  });
};

//   获取评论
export const getCommentforum = (param) => {
  return axios.request({
    url: "/shops/comment/getComment/forum",
    method: "GET",
    params: param,
  });
};

//   获取子评论
export const getCommentchild = (param) => {
  return axios.request({
    url: "/shops/comment/getReply",
    method: "GET",
    params: param,
  });
};

//删除评论
export const deletecomment = (param) => {
  return axios.request({
    url: "/shops/comment/delete",
    method: "DELETE",
    params: param,
  });
};
